<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>掌上工单</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="css/mui.min.css">
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			.mui-scroll-wrapper,
			.mui-scroll {
				background-color: #efeff4;
			}
			.mui-android .mui-navbar-inner.mui-navbar-left {
				opacity: 0;
			}
			.mui-ios .mui-navbar-left .mui-left,
			.mui-ios .mui-navbar-left .mui-center,
			.mui-ios .mui-navbar-left .mui-right {
				opacity: 0;
			}
			.mui-navbar .mui-btn-nav {
				-webkit-transition: none;
				transition: none;
				-webkit-transition-duration: .0s;
				transition-duration: .0s;
			}
			
			.mui-page .mui-table-view:first-child {
				margin-top: 65px;
			}
			.mui-page .mui-table-view:last-child {
				margin-bottom: 30px;
			}
			.mui-table-view {
				margin-top: 20px;
			}
			.mui-table-view:after {
				height: 0;
				color: #999;
				background-color: #efeff4;
			}
			.mui-table-view span.mui-pull-right {
				color: #999;
			}
			.mui-bar{
				background-color: rgba(0,153,204,.9);
			}
			.mui-icon{
				color: #FFFFFF;
			}
		</style>
	</head>

	<body>
		<div class="mui-content">
			<div class="mui-scroll-wrapper">
				<div class="mui-scroll">
					<ul class="mui-table-view mui-table-view-chevron">
						<li class="mui-table-view-cell mui-media">
							<a class="mui-navigate-right" id="profile" href="profile.html">
								<img class="mui-media-object mui-pull-left head-img" id="head-img" src="images/user-photo.png">
								<div class="mui-media-body" id="username">
								</div>
							</a>
						</li>
					</ul>
					<ul class="mui-table-view">
						<li class="mui-table-view-cell">
							<a href="setting.html" id="setting" class="mui-navigate-right">新消息通知</a>
						</li>
				
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" id="tel" open-type="tel">
								客服电话
							</a>
						</li>
					 
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" id="update" open-type="update">
								版本更新
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" id="about" href="about.html">
								技术支持
							</a>
						</li>
					</ul>
					<p><a id="logout" href="login.html" style="height: 45px;width: 90%;margin: 5%;line-height:12px;" class="mui-btn mui-btn-danger mui-btn-block">注销</a></p>
				</div>
			</div>
		</div>
		
		
	</body>
	<script src="js/mui.min.js"></script>
	<script src="js/mui.view.js "></script>
	<script src='libs/easymob-webim-sdk/jquery-1.11.1.min.js'></script>
	<script src='libs/easymob-webim-sdk/strophe-custom-2.0.0.js'></script>
	<script src='libs/easymob-webim-sdk/json2.js'></script>
	<script src="libs/easymob-webim-sdk/easemob.im-1.0.5.js"></script>
	<script type="text/javascript" src="js/md5.js" ></script>
	<script type="text/javascript" src="js/uuid.js" ></script>
	<script type="text/javascript" src="js/utils.js" ></script>
		
	<script>
		var aniShow = "pop-in";
		mui.init();
		 //初始化单页view
		
		 //初始化单页的区域滚动
		mui('.mui-scroll-wrapper').scroll();
		 //分享操作
		mui.plusReady(function() {
			var user = xhz.getUser();
			
			var text = user.username + "<p class='mui-ellipsis'>手机:"+user.mobile+"</p>" ;
			document.getElementById('username').innerHTML = text;
			//客服电话
			document.getElementById("tel").addEventListener('tap', function() {
				plus.device.dial(SERVICE_TEL, true);
			});
			 //检查更新
			document.getElementById("update").addEventListener('tap', function() {
				xhz.update(true) ;
			});
			document.getElementById("logout").addEventListener('tap', function(e) {
				var btns = ['取消','确定'] ;
				mui.confirm('亲，真的忍心退出吗?','',btns,function(e){
					if (e.index == 1){
						var userinfo = {};
						xhz.setUser(userinfo) ;
						plus.runtime.restart();
					}
				});
			});
		});
		
		//链接跳转
		mui('.mui-table-view').on('tap', 'a', function() {
			var href = this.href;
			console.debug("href => " + href);
			if(!href){
				return  ;
			}
			
			mui.openWindow({
				id: href,
				url: href,
				show: {
					aniShow: aniShow
				},
				waiting: {
					autoShow: true
				}
			});
		});
	</script>
</html>
